#ifndef _REQUEST_HPP
#define _REQUEST_HPP 1

#include <boost/shared_ptr.hpp>
#include "MacArrayMessage.hpp"
#include "RequestCore.hpp"
#include "SignedRequestCore.hpp"

namespace BFT
{
	namespace messages
	{


		class Request : public MacArrayMessage
		{

		public:

			Request(uint16_t _tag, uint32_t _sender, boost::shared_ptr<RequestCore> _pay, bool _b);

			Request(uint16_t _tag, uint32_t _sender, boost::shared_ptr<RequestCore> _pay);

			//Request(boost::shared_ptr<char>);
			Request(boost::shared_ptr<char> _buffer, int _buffer_size);
			
			Request(VerifiedMessageBase vmb);
			
			boost::shared_ptr<RequestCore> getCore();
			
			bool equals(boost::shared_ptr<Request>);
			
			void printInfo();
			
			boost::shared_ptr<RequestCore> getRequestCore();
			
		protected:

			boost::shared_ptr<RequestCore> core;
		};

		inline boost::shared_ptr<RequestCore> Request::getRequestCore() {return core;}

	} //namespace messages
} // namespace BFT

#endif
